package ru.dadle8.service.impl.action;

import org.springframework.stereotype.Service;
import org.telegram.telegrambots.meta.api.objects.Update;
import org.telegram.telegrambots.meta.exceptions.TelegramApiException;
import ru.dadle8.model.bot.type.Action;

@Service
public class GetActionServiceImpl extends AbstractActionService {

    @Override
    public String getAction() {
        return Action.GET.getAction();
    }

    @Override
    public void processUpdate(Update update) throws TelegramApiException {
        String text = getStorage().getRandQuote();
        getBot().execute(getMessageHelper().sendMessage(getChatId(), text));
    }
}
